﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserList.aspx.cs" Inherits="admin_UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
    <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
    <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

    <style type="text/css">
        <!--
        html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
        scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
        -->
    </style>


</head>
<body>
    <form id="form1" runat="server">
        <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">用户管理</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
  <div class="share_content_pad">
      <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="60">选择部门：</td>
          <td>
            <asp:DropDownList ID="ddlSection" runat="server" DataSourceID="SectionDataSource" DataTextField="SectionName" DataValueField="SectionId" AppendDataBoundItems="True" Font-Size="12px">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                    </asp:DropDownList>
          </td>
          <td width="60">状态：</td>
          <td colspan="2">
                <asp:DropDownList ID="ddlState" runat="server" Font-Size="12px">
                        <asp:ListItem Value="2">全部</asp:ListItem>
                        <asp:ListItem Value="1">在职</asp:ListItem>
                        <asp:ListItem Value="0">离职</asp:ListItem>
                    </asp:DropDownList>
          </td>
        </tr>
        <tr>
          <td width="60">用户名：</td>

          <td>
                <asp:TextBox ID="txtLoginName" runat="server" Width="80%"></asp:TextBox>
            </td>
          <td width="60">员工姓名：</td>
          <td colspan="2">
            <asp:TextBox ID="txtUserName" runat="server" Width="80%"></asp:TextBox>
          </td>
        </tr>
        <tr>

          <td width="60">加入时间：</td>
          <td>
            <asp:TextBox ID="txtJoinTime" runat="server" Width="80%" CssClass="Wdate" onClick="WdatePicker()"></asp:TextBox>
          </td>
          <td width="60">学历：</td>
          <td width="40">
                <asp:DropDownList ID="ddlAcademicCertificate" runat="server" Font-Size="12px">
                        <asp:ListItem Value="0">请选择</asp:ListItem>
                        <asp:ListItem Value="1">本科</asp:ListItem>
                        <asp:ListItem Value="2">大专</asp:ListItem>
                        <asp:ListItem Value="3">中专</asp:ListItem>
                    </asp:DropDownList>
          </td>
          <td>
            <asp:ImageButton ID="imgbtnFind" runat="server" ImageUrl="~/images/reach_button.gif"
                        OnClick="imgbtnFind_Click" />
          </td>
        </tr>
      </table>
      <br />
      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  BorderColor="#77ACD0" HorizontalAlign="Center"
             CellPadding="3"
            GridLines="Horizontal" DataKeyNames="UserId" OnRowCommand="GridView1_RowCommand" AllowPaging="True" EmptyDataText="没有搜索到符合的数据！" Width="100%" OnPageIndexChanging="GridView1_PageIndexChanging">
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <Columns>
                <asp:BoundField DataField="UserId" HeaderText="序号" SortExpression="UserId">
                    <HeaderStyle CssClass="itemhead" />
                </asp:BoundField>
                <asp:BoundField DataField="LoginName" HeaderText="用户名" SortExpression="LoginName" >
                    <HeaderStyle CssClass="itemhead" />
                </asp:BoundField>
                <asp:BoundField DataField="UserName" HeaderText="真实姓名" SortExpression="UserName" >
                    <HeaderStyle CssClass="itemhead" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="状态">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Convert.ToBoolean(Eval("State"))==true?"~/images/sel_person.gif":"~/images/un_person.gif" %>' CommandArgument='<%# Eval("UserId") %>' CommandName="updateState" OnClientClick="return LeaveRecord()" ToolTip='<%# Convert.ToBoolean(Eval("State"))==true?"在职":"离职" %>'/>
                    </ItemTemplate>
                    <HeaderStyle CssClass="itemhead" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="修改">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton2" runat="server" CommandArgument='<%# Eval("LoginName") %>'
                            CommandName="updateInfo" ImageUrl="~/images/go_mod.gif" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="itemhead" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除" ShowHeader="False">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton3" runat="server" CommandArgument='<%# Eval("UserId") %>'
                            CommandName="delUser" ImageUrl="~/images/go_del.gif" OnClientClick="return confirm('是否删除？');" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="itemhead" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="初始密码">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton4" runat="server" CommandArgument='<%# Eval("LoginName") %>'
                            CommandName="resetPassword" ImageUrl="~/images/setpass.gif" OnClientClick="return confirm('确认要初始密码为123456？');" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="itemhead" />
                </asp:TemplateField>
            </Columns>
            <RowStyle BackColor="Transparent" ForeColor="Black" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                                    <PagerStyle BackColor="#E4F1FD" ForeColor="#1E5494" HorizontalAlign="Right" />
                                    <HeaderStyle BackColor="#E4F1FD" ForeColor="#1E5494" BorderColor="#77ACD0" HorizontalAlign="Center"/>
                                    <AlternatingRowStyle BackColor="#E4F1FD" />
        </asp:GridView>
      </div>
      </div>
      </div>
        <asp:ObjectDataSource ID="SectionDataSource" runat="server" SelectMethod="findParentSectionInfo"
            TypeName="TarreOA.TarreOABLL.SectionServices"></asp:ObjectDataSource>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
function LeaveRecord()
{
    if (!confirm ("是否离职 ？"))
        return false;
    return true;
//        reVal = window.showModalDialog ("AddDimission.aspx", "",
//        "status:no;center:yes;scroll:no;resizable:no;help:no;dialogWidth:550px;dialogHeight:400px");
}
</script>